Skip to main content

DigiLocker Credentials API

The following document highlights the details of the DigiLocker Credentials API.

API Description

Objective

The DigiLocker Credentials API stores the Client ID and Client secret that you procure through DigiLocker in HyperVerge's database, and enables you to store these credentials for the first time or update them for existing records.

Resource

For steps on procuring DigiLocker credentials (Client ID and Client Secret), refer to the DigiLocker credentials procurement guide.

InputOutput
The client ID and key generated on DigiLocker while creating the partner's accountA success message

API URL

https://ind-verify.hyperverge.co/api/digilocker/updateCredentials

API Endpoint

updateCredentials

Overview

The DigiLocker Credentials API is RESTful and uses standard HTTP verbs and status codes. The responses are in JSON format and you should send the request payload as JSON through a POST request.

Method - POST

Authentication

You need a unique pair of application ID ( appId ) and application key ( appKey ) from HyperVerge to verify your identity for accessing the API.

Headers

HeaderMandatory / OptionalDescriptionInput Format
content-type MandatoryThis parameter defines the media type for the request payloadapplication/json
appId MandatoryThe application identifier shared by HyperVerge. You can find the details in the dashboard's credentials tabThis should be a unique value
appKey MandatoryThe application key shared by HyperVerge. You can find the details in the dashboard's credentials tabThis should be a unique value
transactionIdOptionalA unique identifier for tracking a user journeyThis should be both unique and easily associated with the user's journey in your application(s)

Inputs

The following table provides the details of the parameters required for the DigiLocker Credentials API's request body:

ParameterMandatory / OptionalTypeDescriptionInput FormatDefault Value
clientIdMandatorystringThe client ID generated on DigiLocker partner's accountNot ApplicableNot Applicable
clientSecretMandatorystringThe client key generated on DigiLocker partner's accountNot ApplicableNot Applicable

Request

The following code snippet demonstrates a standard curl request for the DigiLocker Credentials API:

curl --location --request POST 'https://ind-verify.hyperverge.co/api/digilocker/updateCredentials' \
--header 'Content-Type: application/json' \
--header 'appId: <Enter_the_HyperVerge_appId>' \
--header 'appKey: <Enter_the_HyperVerge_appKey>' \
--header 'transactionId: <Enter_the_transactionId>' \
--data-raw '{
"clientId": "<Enter_the_client_ID>",
"clientSecret": "<Enter_the_client_key>"
}'

Success Response

The following code snippet demonstrates a success response from the DigiLocker Credentials API:

{
"status": "success",
"statusCode": "200",
"result": {
"DigiLocker": {
"clientId": "<The_Shared_clientId>",
"clientSecret": "<The_Shared_clientKey>"
}
}
}

Success Response Details

The following table outlines the details of the success response from the DigiLocker Credentials API:

ParameterTypeDescription
statusstringThe status of the request
statusCodestringThe HTTP status code for the response
resultobjectThe JSON object containing the DigiLocker credentials
result.DigiLockerobjectThe DigiLocker object containing the stored credential details
result.DigiLocker.clientIdstringThe client ID that was stored in HyperVerge's database
result.DigiLocker.clientSecretstringThe client secret that was stored in HyperVerge's database

Error Responses

The following are some error responses from the DigiLocker Credentials API:

{
"status": "failure",
"statusCode": "401",
"error": "Missing/Invalid credentials"
}

Error Response Details

A failure or error response contains a failure status with a relevant status code and error message.
The following table lists all error responses:

Status CodeError MessageError DescriptionError Resolution
401Missing/Invalid credentialsThe request is either missing the mandatory appId and appKey combination or has invalid valuesProvide valid appId and appKey credentials in the request
404Not FoundRequested resource could not be foundEnter the valid Client ID and/or Client Secret in the request
500Internal Server ErrorThere was an error with HyperVerge's serverPlease check the request headers or contact the HyperVerge team for resolution
Was this helpful?
Ask AIBeta
Hi! How can I help?
Ask me anything about HyperVerge products, APIs, and SDKs.
Try asking: